{:W('Template/top')}
<style>
    .div2-1,.div3-1,.div4,.div4-1{
        display:block;
    }
</style>
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">用户/角色</a>&gt;<a href="{:U('Role/index',array('id' => 10))}">角色列表</a>&gt;权限分配
        </div>
        <div class="cTitle2">分配 <span class="text-c5">{$roleinfo.info.name}</span> 权限</div>
        <div style="width:100%;">
            <volist name="roleinfo['top']" id='v'>
                <dl class="div1">
                    <dt class="mainName authHover">
                        <div style="border: 1px solid #e3e3e3;line-height: 45px;">
                            <div style="width:35%;border-right:1px solid #e3e3e3">
                                <input class="checkMain" id="top{$v.id}" style="margin-left:5px;" name="subBox" type="checkbox" value="{$v.id}"
                                <in name="v.id" value="$roleinfo['auth_id']">checked</in>
                                />
                                <span class="name">{$v.name}</span>
                            </div>
                        <div style="width:65%;float:right;padding-left:10px;margin-top:-45px;">{$v.remark}</div>
                        </div>
                    </dt>

                    <dd>
                        <foreach name="roleinfo['stair']" item="vv">
                            <eq name='vv.parent_id' value='$v.id'>
                                <div class="div2">
                                    <div style="border-right: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3;border-left:1px solid #e3e3e3;line-height: 45px;" class="authHover">
                                        <div style="width:35%;border-right:1px solid #e3e3e3">
                                            <input class="sub parentRole" type="checkbox" style="margin-left: 60px;" name="subBox" value="{$vv.id}"
                                            <in name="vv.id" value="$roleinfo['auth_id']">checked</in>
                                            />
                                            <span class="name2">{$vv.name}</span>
                                        </div>
                                        <div style="width:65%;float:right;padding-left:10px;margin-top:-45px;">{$vv.remark}</div>
                                    </div>

                                    <foreach name="roleinfo['second']" item="vvv">
                                        <eq name='vvv.parent_id' value='$vv.id'>
                                            <div class="div3">
                                                <div style="width:100%;border-bottom: 1px solid #e3e3e3;line-height: 45px;margin-bottom: -18px;" class="authHover">
                                                    <div style="width:35%;border-right:1px solid #e3e3e3">
                                                        <input class="sub check3" type="checkbox" style="margin-left:120px;" name="subBox" value="{$vvv.id}"
                                                        <in name="vvv.id" value="$roleinfo['auth_id']">checked</in>
                                                        />
                                                        <span class="name3">{$vvv.name}</span>
                                                    </div>
                                                    <div style="width:65%;float:right;padding-left:10px;margin-top:-45px;">{$vvv.remark}</div>
                                                </div>
                                                <br>
                                                <foreach name="roleinfo['three_stage']" item="vvvv">
                                                    <eq name='vvvv.parent_id' value='$vvv.id'>
                                                        <div style="border-bottom:1px solid #e3e3e3;line-height:45px;" class="div4 authHover">
                                                            <div style="width:35%;border-right:1px solid #e3e3e3">
                                                                <input class="sub checkRole" type="checkbox" style="margin-left:180px;" name="subBox"
                                                                       value="{$vvvv.id}"
                                                                <in name="vvvv.id" value="$roleinfo['auth_id']">checked</in>
                                                                />
                                                                {$vvvv.name}
                                                            </div>
                                                            <div style="width:65%;float:right;padding-left:10px;margin-top:-45px;">{$vvvv.remark}</div>
                                                        </div>
                                                    </eq>
                                                </foreach>
                                            </div>
                                        </eq>
                                    </foreach>
                                </div>
                            </eq>
                        </foreach>
                    </dd>
                </dl>
                <div style="height:40px;background-color: #e1e6ea"></div>
            </volist>
        </div>

        <div class="text-center clearfix pwb pull-right">
            <input type="submit" value="保存" class="btn btn-warning" onclick="saveAuth()"/>
            <a href="{:U('Role/index',array('id'=>I('get.id')))}" class="btn btn-info">返回</a>
            <input type="hidden" value="{:U('Role/allAuth',array('id'=>I('get.id'),'aid'=>I('get.aid')))}" id="chkr"/>
        </div>
    </div>
</div>
{:W('Template/bottom')}

</body>
</html>